package demo.other_test;

import java.util.Arrays;
import java.util.List;

public class ArraysTest {

    public static void main(String[] args) {
        String[] myArray = {"Apple", "Banana", "Orange"};
        List<String> myList = Arrays.asList(myArray);

        myList.clear(); //Exception in thread "main" java.lang.UnsupportedOperationException

        //ArrayList<Integer> list = Arrays.asList(new Integer[]{1, 2, 4});  //类型都不一样，返回的不是一个arraylist



    }
}
